var SearchForm = function () {
  var template = /* html */ `
    <div class="search-form" v-loading.fullscreen.lock="loading">
      <el-form :inline="true" size="small">
        <el-form-item>
          <el-select clearable style="width:115px" v-model="search.status" placeholder="请选择状态">
            <el-option v-for="status in statusList" :key="'status_'+status.value" :value="status.value" :label="status.label">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-select clearable filterable v-model="search.providerName" placeholder="请选择商家">
            <el-option v-for="(providerName,index) in dropdownOption.providerNameList" :key="'providerName_'+index" :value="providerName"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-input style="width:calc(100vw - 700px);min-width:135px"  v-model="search.combinationWhere" placeholder="请输入搜索条件"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="$emit('search')">搜索</el-button>
          <slot name="btn"></slot>
        </el-form-item>
      </el-form>
    </div>
  `;

  return {
    props: {
      search: {
        type: Object,
        required: true
      },
      dropdownOption:{
        type:Object,
        required:true
      }
    },

    data: function () {
      return {
        loading:false,
        statusList: i18n.getDropDown('shoppingMallMaterial.status', [0, 1]),
      };
    },

    template: template
  };
}();